//
//  TabViewController.m
//  JDFinance
//
//  Created by 黄平 on 2016/12/2.
//  Copyright © 2016年 黄平. All rights reserved.
//

#import "TabViewController.h"
#import "NavViewController.h"
#import "FirstViewController.h"
#import "TwoViewController.h"
#import "ThreeViewController.h"
#import "FourViewController.h"
#import "FiveViewController.h"
@interface TabViewController ()

@end

@implementation TabViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    [self setTabBarC] ;
}
-(void)setTabBarC
{
    //控制标签
    NavViewController * nvc1 = [[NavViewController alloc]initWithRootViewController:[[FirstViewController alloc]init]] ;
    NavViewController * nvc2 = [[NavViewController alloc]initWithRootViewController:[[TwoViewController alloc]init]] ;
    NavViewController * nvc3 = [[NavViewController alloc]initWithRootViewController:[[ThreeViewController alloc]init]] ;
    NavViewController * nvc4 = [[NavViewController alloc]initWithRootViewController:[[FourViewController alloc]init]] ;
    NavViewController * nvc5 = [[NavViewController alloc]initWithRootViewController:[[FiveViewController alloc]init]] ;
    
//    UITabBarItem * tab1 =[[UITabBarItem alloc]initWithTitle:@"我" image:[UIImage imageNamed:@"我.png"]  selectedImage:[UIImage imageNamed:@"篮球1.png"]] ;
    UITabBarItem*tab1=[[UITabBarItem alloc]initWithTitle:@"我" image:[UIImage imageNamed:@"我.png"] tag:1];
    
    UITabBarItem * tab2 =[[UITabBarItem alloc]initWithTitle:@"理财" image:[UIImage imageNamed:@"理财.png"]  selectedImage:[UIImage imageNamed:@"最新1.png"]] ;
    
    UITabBarItem * tab3 =[[UITabBarItem alloc]initWithTitle:@"投资" image:[UIImage imageNamed:@"投资.png"]  selectedImage:[UIImage imageNamed:@"视频1.png"]] ;
    
    UITabBarItem * tab4 =[[UITabBarItem alloc]initWithTitle:@"白条" image:[UIImage imageNamed:@"白条.png"]  selectedImage:[UIImage imageNamed:@"数据1.png"]] ;
    
    UITabBarItem * tab5 =[[UITabBarItem alloc]initWithTitle:@"众筹" image:[UIImage imageNamed:@"众筹.png"]  selectedImage:[UIImage imageNamed:@"更多1.png"]] ;
    
    // 联系 标签和导航
    nvc1.tabBarItem = tab1 ;
    nvc2.tabBarItem = tab2 ;
    nvc3.tabBarItem = tab3 ;
    nvc4.tabBarItem = tab4 ;
    nvc5.tabBarItem = tab5 ;
    self.viewControllers = @[nvc1, nvc2, nvc3, nvc4, nvc5] ;
    
    // 被选中颜色
    self.tabBar.tintColor = [UIColor blueColor] ;
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}



@end
